<?
$subframe = $_GET['subframe'];
$frame = $_GET['frame'];
//$code = $_lang == 'vn' ? 'vn_news' : 'en_news';
$code = 'vn_'.$frame.'_'.$subframe;
$parentWhere = "and parent = (select id from tbl_content_category where code='$code')";
$parentRecord = getRecord("tbl_content","1=1 ".$parentWhere);
$cat = killInjection($_REQUEST['cat']);
if ($cat=='') $cat = $parentRecord['parent'];
$per_page =4;
$t=0;
if ($_REQUEST['t']!='') $p=killInjection($_REQUEST['t']);

$sql = "select * from tbl_content where status=0 and hotnew=1 $parentWhere order by sort,date_added desc limit ".$per_page*$t.",".$per_page;
$result = @mysql_query($sql,$conn);
$num=mysql_num_rows($result);
if($num==0){?>
	<div class="module">
        <div class="titlesitebar">TIN NỔI BẬT</div>
		<div class="redlist">
			<font color="#FF0000" size="2">Thông tin đang cập nhật ...</font>
		</div>
	</div>
	<div class="module"><img src="Images/hinh1.jpg" width="170" height="70" /></div>
<? }
else{?>
<div class="module">
        <div class="titlesitebar">TIN NỔI BẬT</div>
            <div class="redlist">
            	<ul>
				<? 
				while($row=mysql_fetch_assoc($result))
				{
				?>
                	<li><a href="./?frame=news_detail&id=<?=$row['id']?>"><?=$row["name"]?></a></li>
                <? 
				}?>
				</ul>
            </div>
        </div><!--endmodule-->
          <div class="module"><img src="Images/hinh1.jpg" width="170" height="70" /></div>
<? }?>